﻿using PLCS.Application.Contracts.ConfigApp.Dtos;
using PLCS.Application.Contracts.OrderApp.Dtos;
using PLCS.Application.Contracts.TaskApp.Dtos;
using PLCS.Domain.Orders;
using PLCS.Domain.Shared.Orders;

namespace PLCS.Application.Contracts.OrderApp;

public interface IOrderAppService : ICrudAppService<OrderDto, Guid, PagedResultRequestDto, OrderEditDto>
{
    /// <summary>
    /// 根据工单号获取工单
    /// </summary>
    /// <param name="orderNo">工单号</param>
    /// <returns></returns>
    Task<OrderDto> GetByOrderNoAsync(string orderNo);

    /// <summary>
    /// 修改工单
    /// </summary>
    /// <param name="orderDto"></param>
    /// <returns></returns>
    Task UpdateAsync(OrderEditDto orderDto);

    /// <summary>
    /// 根据工单类型获取工单
    /// </summary>
    /// <param name="orderType"></param>
    /// <returns></returns>
    Task<IEnumerable<OrderDto>> GetListByType(OrderType orderType);

    Task<PagedResultDto<OrderDto>> GetListBySearchAsync(PagedResultRequestDto input, string? orderNo);
}